package com.cn.wanxi.service;

import com.cn.wanxi.model.NewsModel;

import java.util.List;

public class NewsService {
    public List<NewsModel> getNewsList(){
        NewsModel newsModel = new NewsModel();
        for (int i = 0; i < newsModel.titles.length; i++) {
            NewsModel news = new NewsModel();
            news.setNewsType(newsModel.newsTypes[i]);
            news.setTitle(newsModel.titles[i]);
            newsModel.list.add(news);
            System.out.println(newsModel.toString());
        }
        return newsModel.list;
    }
}
